package com.chuku.service;

import com.bean.WmsTBill;
import com.bean.WmsTBillDetails;
import com.bean.WmsTCustomer;
import com.bean.WmsTStore;
import com.chuku.mapper.ChuKuMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author wxrob
 */
@Service
public class ChuKuService {

    @Autowired
    ChuKuMapper chuKuMapper;

    //出库
    public List<WmsTCustomer> getCusMess(String shuRu) {
        return chuKuMapper.getCusMess(shuRu);
    }

    //出库货物明细
    public List<WmsTBillDetails> selChuKu(String custID){
        return chuKuMapper.selChuKu(custID);
    }

    //办理出库插入wms_t_bill表
    public void inChuKu(WmsTBill wmsTBill){
        chuKuMapper.inChuKu(wmsTBill);
    }

    //办理出库插入账单详情表wms_t_bill_details表
    public void inDetails(WmsTBillDetails wmsTBillDetails){
        chuKuMapper.inDetails(wmsTBillDetails);
    }

    //办理出库更改WmsTTray表,
    public void update(String trayID){
        chuKuMapper.update(trayID);
    }

    //查询仓库不为空的仓库
    public List<WmsTStore> selectStore(){
        return chuKuMapper.selectStore();
    }

    //查询仓库内容Stores
    public List<Map<String, Object>> selStores(String storeID){
        return chuKuMapper.selStores(storeID);
    }

    //出库单查询
    public List<Map<String, Object>> bill(String start,String end,String custName,String billID){
        return chuKuMapper.bill(start,end,custName,billID);
    }

    //出库单明细查询
    public List<Map<String, Object>> details(String start,String end,String custName,String billID){
        return chuKuMapper.details(start,end,custName,billID);
    }
}



